///////////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
#ifndef	__SETTINGS_MANAGER_H__
#define	__SETTINGS_MANAGER_H__

#include <Config.h>
#include <AbstractManager.h>
#include <Math/Matrix4x4.h>

//-----------------------------------------------------------------------------

//min 0x0000000000000001
//step 1 2 4 8
//max 0x8000000000000000
#define			MGLS_RENDER_DEPTH					0x0000000000000001
#define			MGLS_RENDER_WITH_SHADOW				0x0000000000000002

//-----------------------------------------------------------------------------

class SettingsManager
	:	public AbstractManager<SettingsManager>
{
public:
	/*
	*
	*/
								SettingsManager()
	{
		m_flags = 0;
		m_shadowMatrix.SetIdentity();
		m_shaderPass = 0;
	}

	/*
	*
	*/
	virtual						~SettingsManager()
	{
	}

	/*
	*
	*/
	void						SetFlag(u64 flag, bool on)
	{
		if( on )
		{
			m_flags |= flag;
		}
		else
		{
			m_flags &= ~flag;
		}
	}

	/*
	*
	*/
	bool						GetFlag(u64 flag)
	{
		return (m_flags & flag) == flag;
	}

	/**
	*
	*/
	void						SetShadowMatrix( Matrix4x4 mat )
	{
		m_shadowMatrix = mat;
	}

	/**
	*
	*/
	Matrix4x4					GetShadowMatrix()
	{
		return m_shadowMatrix;
	}

	/**
	*	Shader passes
	*/
	u8			GetShaderPass()						{	return m_shaderPass;		}
	void		SetShaderPass(u8	shaderPass)		{	m_shaderPass = shaderPass;	}

private:

	u64							m_flags;

	Matrix4x4					m_shadowMatrix;

	u8							m_shaderPass;
};

#endif	//	__SETTINGS_MANAGER_H__
//-----------------------------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
